/**
 * 
 */
package travibot.ui.gui.forms.viewers;

import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Tree;
import travibot.ui.gui.forms.listeners.CityListSelectionChangedListener;
import travibot.ui.gui.forms.providers.content.CityListContentProvider;
import travibot.ui.gui.forms.providers.label.CityListLabelProvider;


/**
 * @author tajzivit
 *
 */
public class CityListViewer extends TreeViewer {

    public CityListViewer(Composite parent) {

        super(parent);
        
        init();
    }
    
    public CityListViewer(Composite parent, int style){
    
        super(parent, style);
        
        init();
    }
    
    public CityListViewer(Tree tree){
        
        super(tree);
        
        init();
        
    }
    

    private void init(){
        
        this.setContentProvider(new CityListContentProvider());
        this.setLabelProvider(new CityListLabelProvider());
        this.addSelectionChangedListener(new CityListSelectionChangedListener());
    }
}
